import request from '@/utils/request'

// https://api.wuliuren.com/api/orders 订单列表
export function ordersList(data) {
  return request({
    url: '/admin/user-device-records',
    method: 'get',
    params: data
  })
}

// https://api.wuliuren.com/api/orders 新增订单
export function addOrders(data) {
  return request({
    url: '/orders',
    method: 'post',
    data: data
  })
}

export function getOrders(data) {
  return request({
    url: '/orders/' + data.id,
    method: 'get'
  })
}


// https://api.wuliuren.com/api/orders 编辑订单
export function editOrders(data) {
  return request({
    url: '/orders/' + data.id,
    method: 'put',
    data: data
  })
}

// https://api.wuliuren.com/api/orders 删除订单
export function delOrders(data) {
  return request({
    url: '/orders/' + data.id,
    method: 'delete'
  })
}


// https://api.wuliuren.com/api/order-progress 订单进度列表
export function orderProgressList(data) {
  return request({
    url: 'order-progress',
    method: 'get',
    params: data
  })
}

// https://api.wuliuren.com/api/order-progress 添加订单进度
export function addOrderProgress(data) {
  return request({
    url: 'order-progress',
    method: 'post',
    data: data
  })
}

// https://api.wuliuren.com/api/order-progress 编辑订单进度
export function editOrderProgress(data) {
  return request({
    url: 'order-progress/' + data.id,
    method: 'PUT',
    data: data
  })
}

// https://api.wuliuren.com/api/order-progress 删除订单进度
export function delOrderProgress(data) {
  return request({
    url: 'order-progress/' + data.id,
    method: 'delete'
  })
}


// https://api.wuliuren.com/api/order-statuses 订单状态列表
export function orderStatusesList(data) {
  return request({
    url: 'order-statuses',
    method: 'get',
    params: data
  })
}

// https://api.wuliuren.com/api/order-statuses 添加订单状态
export function addOrderStatuses(data) {
  return request({
    url: 'order-statuses',
    method: 'post',
    data: data
  })
}

// https://api.wuliuren.com/api/order-statuses 编辑订单状态
export function editOrderStatuses(data) {
  return request({
    url: 'order-statuses/' + data.id,
    method: 'put',
    data: data
  })
}

// https://api.wuliuren.com/api/order-statuses 删除订单状态
export function delOrderStatuses(data) {
  return request({
    url: 'order-statuses/' + data.id,
    method: 'delete'
  })
}



// https://api.wuliuren.com/api/customer-contacts 联系人列表
export function getContactsList(data) {
  return request({
    url: 'customer-contacts',
    method: 'get',
    params: data
  })
}

// https://api.wuliuren.com/api/customer-contacts 添加联系人
export function addContacts(data) {
  return request({
    url: 'customer-contacts',
    method: 'post',
    data: data
  })
}

// https://api.wuliuren.com/api/customer-contacts 编辑联系人
export function editContacts(data) {
  return request({
    url: 'customer-contacts/'+data.id,
    method: 'put',
    data: data
  })
}

// https://api.wuliuren.com/api/customer-contacts 删除联系人
export function delContacts(data) {
  return request({
    url: 'customer-contacts/'+data.id,
    method: 'delete',
    data: data
  })
}

// https://api.wuliuren.com/api/customer-invoice-subjects 开票资料列表
export function invoiceSubjects(data) {
  return request({
    url: '/customer-invoice-subjects',
    method: 'get',
    params: data
  })
}

// https://api.wuliuren.com/api/customer-invoice-subjects 新增开票资料
export function addInvoiceSubjects(data) {
  return request({
    url: '/customer-invoice-subjects',
    method: 'post',
    data: data
  })
}

// https://api.wuliuren.com/api/customer-invoice-subjects 编辑开票资料
export function editInvoiceSubjects(data) {
  return request({
    url: '/customer-invoice-subjects/' + data.id,
    method: 'put',
    data: data
  })
}

// https://api.wuliuren.com/api/customer-invoice-subjects 删除开票资料
export function delInvoiceSubjects(data) {
  return request({
    url: '/customer-invoice-subjects/' + data.id,
    method: 'delete'
  })
}
